package com.xs.business.goods.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.xs.business.goods.dao.GoodsDao;
import com.xs.business.goods.entity.Goods;
import com.xs.mvc.dao.BaseDao;
import com.xs.mvc.service.BaseServiceImpl;

/**
 * @Title: <P>GoodsServiceImpl.java</P>
 * @Package <P>com.xs.business.goods.service</P>
 * @Description: <P>GoodsServiceImpl</P>
 * @author renweiping
 * @date 2019年2月18日 上午11:01:24
 * @version 1.0
 */

@Transactional
@Service
public class GoodsServiceImpl  extends BaseServiceImpl<Goods, Integer> implements GoodsService{

	@Autowired
	private GoodsDao GoodsDao;
	
	/* (non-Javadoc)
	 * @see com.xs.mvc.service.BaseServiceImpl#getBaseDao()
	 */
	@Override
	protected BaseDao<Goods, Integer> getBaseDao() {
		
		return GoodsDao;
	}

	/* (non-Javadoc)
	 * @see com.xs.business.goods.service.GoodsService#updateStock(int)
	 */
	@Override
	public int updateStock(int id) {
		// TODO Auto-generated method stub
		return GoodsDao.updateStock(id);
	}

}
